﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Artemis;


namespace JAWWS
{
    class Floor

    {
        public float posX, posY, posZ = 0;
        public uint texID;
        Renderer floorRender;
        


        public Floor()
        {
            //floorRender = new Renderer();

            LoadTex();
            GL.glBindTexture(GLenum.GL_TEXTURE_2D, LoadTex());
            draw();

        }

        public uint LoadTex()
        {
           return texID =  Toolkit.LoadTexture("C:\\wood.bmp", 0, ChannelType.RGBA, TextureFlag.Mipmaps);   
            
        }

        public void draw()
        {

             
            
            for (int i = 0; i < 7; i++)
            {
                GL.glBegin(GLenum.GL_POLYGON);
                GL.glTexCoord2d(5.0, 0.0);
                GL.glVertex3f(1.0f, -0.05f, 1.0f + i);

                GL.glTexCoord2d(5.0, 5.0);
                GL.glVertex3f(1.0f, -0.05f, -1.0f + i);

                GL.glTexCoord2d(0.0, 5.0);
                GL.glVertex3f(-1.0f, -0.05f, -1.0f + i);

                GL.glTexCoord2d(0.0, 0.0);
                GL.glVertex3f(-1.0f, -0.05f, 1.0f + i);
            }

         }

    }
}
